#ifndef RTK_DEVICE_H
#define RTK_DEVICE_H

#include "../driver/driver_usart.h"
#include "../include/tool/log.h"
#include <string>
#include <thread>
#include <vector>

class C_rtkDevice
{
private:
    /* data */
    SerialDriver *m_rtKserial;
    std::vector<uint8_t> m_rtkUsartBuffer;
    
public:
    /* data */
    uint8_t *m_recvBuf; // 储存串口接收到的数据
    std::vector<uint8_t> m_gnssStrBuffer;

    /* function */
    C_rtkDevice(const char *_path, int _speed);
    ~C_rtkDevice();

    void sandUsartData(uint8_t *buf, uint32_t bufLen);
    int32_t recvUsartData(std::vector<uint8_t> &gnss_buffer);
};

#endif
